package lt.marsrutai.mobile.android.activity.intent;

import lt.marsrutai.mobile.android.activity.StopSearchActivity;
import android.app.Activity;
import android.app.SearchManager;
import android.content.Intent;
import android.os.Bundle;

public class StopSearchIntentHolder extends IntentHolder {

    private static final String SCOPE_FOLDER = "scopeFolder";
    private static final String SCOPE_NAME = "scopeName";
    public static final String QUERY = "query";

    public StopSearchIntentHolder(Activity sourceActivity) {
        super(sourceActivity, StopSearchActivity.class);
    }

    public StopSearchIntentHolder(Intent intent) {
        super(intent);
    }

    public StopSearchIntentHolder(Bundle bundle) {
        super(bundle);
    }

    public void setScopeFolder(String scopeFolder) {
        intent.putExtra(SCOPE_FOLDER, scopeFolder);
    }

    public String getScopeFolder() {
        return intent.getBundleExtra(SearchManager.APP_DATA).getString(SCOPE_FOLDER);
    }

    public void setScopeName(String scopeName) {
        intent.putExtra(SCOPE_NAME, scopeName);
    }

    public String getScopeName() {
        return intent.getBundleExtra(SearchManager.APP_DATA).getString(SCOPE_NAME);
    }
    
    public String getQuery() {
        return intent.getStringExtra(QUERY);
    }

}
